package cc.comac.mom.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipRepairWorkHourService;
import cc.comac.mom.bean.EquipRepairWorkHour;
import cc.comac.mom.util.ResultBean;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value ="EquipRepairWorkHour")
public class EquipRepairWorkHourController {
	
	@Autowired
	private EquipRepairWorkHourService EquipRepairWorkHourService;
	
	@ApiOperation("新增人员工时")
	@RequestMapping(value = "/insert",method = RequestMethod.POST)
	public ResultBean insert(@RequestBody EquipRepairWorkHour obj) {
		return EquipRepairWorkHourService.insert(obj);
	}

	@ApiOperation("修改人员工时")
	@RequestMapping(value = "/update",method = RequestMethod.POST)
	public ResultBean update(@RequestBody EquipRepairWorkHour obj) {
		return EquipRepairWorkHourService.update(obj);
	}
	
	@ApiOperation("删除人员工时")
	@RequestMapping(value = "/delete",method = RequestMethod.POST)
	public ResultBean delete(@RequestBody EquipRepairWorkHour obj) {
		return EquipRepairWorkHourService.delete(obj);
	}
	
	@ApiOperation("查询人员工时")
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public ResultBean selectByCondition(@RequestBody EquipRepairWorkHour obj) {
		return EquipRepairWorkHourService.selectByCondition(obj);
	}
}
